/***API***/
import * as baseAPI from "@/api";
import qs from "qs";
const request = baseAPI.request;

const API = {
  getList: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetInStorage2",
      data: obj
    };
    return request(requestData);
  },

  getOutInStorage: obj => {
    let requestData = {
      method: "post",
      //url: "/YWCK/ywCKGetOutStorage2",
      url: "/YWCK/ywCKGetOutStorageNew2",
      data: obj
    };
    return request(requestData);
  },

  getGoodsTypeList: obj => {
    let requestData = {
      method: "post",
      url: "/YWCK/ywckGetItems2",
      data: obj
    };
    return request(requestData);
  },

  getCateNameList: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetItemCate2",
      data: obj
    };
    return request(requestData);
  },

  getDetailsList: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetInStorageDetail2",
      data: obj
    };
    return request(requestData);
  },

  saveInventory: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKAddInStorage2",
      data: obj
    };
    return request(requestData);
  },
  delete(obj) {
    let requestData = {
      method: "post",
      url: "YWCK/DelYWCKSupplier2",
      data: obj
    };
    return request(requestData);
  },

  audit: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetInStorageAuditFold2",
      data: obj
    };
    return request(requestData);
  },

  getInTypeList: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetInStorageType2",
      data: obj
    };
    return request(requestData);
  },

  getOutTypeList: obj => {
    let requestData = {
      method: "post",
      url: "YWCK/ywCKGetOutStorageType2",
      data: obj
    };
    return request(requestData);
  }
};

export default API;
